package org.example.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.util.Date;

@SpringBootApplication
public class  Springboot03UseIdeaPluginApplication {

	@Bean("date")
	public Date getDate(){
		return new Date();
	}

	public static void main(String[] args) {
		SpringApplication.run(Springboot03UseIdeaPluginApplication.class, args);
//		ConfigurableApplicationContext applicationContext = SpringApplication.run(Springboot03UseIdeaPluginApplication.class, args);
//		UserService userService = applicationContext.getBean("userService", UserService.class);
//		User user = userService.findUuser();
//		System.out.println(user);
//		applicationContext.close();
	}

}
